package com.amc.controllers;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.amc.dto.FoodView;
import com.amc.service.IFoodService;


@Controller
@RequestMapping("/shopcar")
public class ShopCarController {
	private IFoodService service;
	@Resource
	public void setService(IFoodService service) {
		this.service = service;
	}
	
	@RequestMapping("/addfood")
	@ResponseBody
	public FoodView addFood(String foodId){
		return service.queryFood(foodId);
	}
	
	
}
